/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.fii.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Zeus
 */
@Entity
@Table(name = "pg_tmp_cursoalumnos", catalog = "prog_acad", schema = "")
@NamedQueries({
    @NamedQuery(name = "PgTmpCursoalumnos.findAll", query = "SELECT p FROM PgTmpCursoalumnos p"),
    @NamedQuery(name = "PgTmpCursoalumnos.findByPgcodCurso", query = "SELECT p FROM PgTmpCursoalumnos p WHERE p.pgTmpCursoalumnosPK.pgcodCurso = :pgcodCurso"),
    @NamedQuery(name = "PgTmpCursoalumnos.findByPgcodAlumno", query = "SELECT p FROM PgTmpCursoalumnos p WHERE p.pgTmpCursoalumnosPK.pgcodAlumno = :pgcodAlumno"),
    @NamedQuery(name = "PgTmpCursoalumnos.findByPgApPaterno", query = "SELECT p FROM PgTmpCursoalumnos p WHERE p.pgApPaterno = :pgApPaterno"),
    @NamedQuery(name = "PgTmpCursoalumnos.findByPgApMaterno", query = "SELECT p FROM PgTmpCursoalumnos p WHERE p.pgApMaterno = :pgApMaterno"),
    @NamedQuery(name = "PgTmpCursoalumnos.findByPgNombre", query = "SELECT p FROM PgTmpCursoalumnos p WHERE p.pgNombre = :pgNombre"),
    @NamedQuery(name = "PgTmpCursoalumnos.findByPgcodEscuela", query = "SELECT p FROM PgTmpCursoalumnos p WHERE p.pgcodEscuela = :pgcodEscuela"),
    @NamedQuery(name = "PgTmpCursoalumnos.findByPgEscuela", query = "SELECT p FROM PgTmpCursoalumnos p WHERE p.pgEscuela = :pgEscuela")})
public class PgTmpCursoalumnos implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected PgTmpCursoalumnosPK pgTmpCursoalumnosPK;
    @Basic(optional = false)
    @Column(name = "pg_Ap_Paterno", nullable = false, length = 20)
    private String pgApPaterno;
    @Basic(optional = false)
    @Column(name = "pg_Ap_Materno", nullable = false, length = 20)
    private String pgApMaterno;
    @Basic(optional = false)
    @Column(name = "pg_Nombre", nullable = false, length = 40)
    private String pgNombre;
    @Basic(optional = false)
    @Column(name = "pg_codEscuela", nullable = false, length = 3)
    private String pgcodEscuela;
    @Basic(optional = false)
    @Column(name = "pg_escuela", nullable = false, length = 50)
    private String pgEscuela;

    public PgTmpCursoalumnos() {
    }

    public PgTmpCursoalumnos(PgTmpCursoalumnosPK pgTmpCursoalumnosPK) {
        this.pgTmpCursoalumnosPK = pgTmpCursoalumnosPK;
    }

    public PgTmpCursoalumnos(PgTmpCursoalumnosPK pgTmpCursoalumnosPK, String pgApPaterno, String pgApMaterno, String pgNombre, String pgcodEscuela, String pgEscuela) {
        this.pgTmpCursoalumnosPK = pgTmpCursoalumnosPK;
        this.pgApPaterno = pgApPaterno;
        this.pgApMaterno = pgApMaterno;
        this.pgNombre = pgNombre;
        this.pgcodEscuela = pgcodEscuela;
        this.pgEscuela = pgEscuela;
    }

    public PgTmpCursoalumnos(String pgcodCurso, String pgcodAlumno) {
        this.pgTmpCursoalumnosPK = new PgTmpCursoalumnosPK(pgcodCurso, pgcodAlumno);
    }

    public PgTmpCursoalumnosPK getPgTmpCursoalumnosPK() {
        return pgTmpCursoalumnosPK;
    }

    public void setPgTmpCursoalumnosPK(PgTmpCursoalumnosPK pgTmpCursoalumnosPK) {
        this.pgTmpCursoalumnosPK = pgTmpCursoalumnosPK;
    }

    public String getPgApPaterno() {
        return pgApPaterno;
    }

    public void setPgApPaterno(String pgApPaterno) {
        this.pgApPaterno = pgApPaterno;
    }

    public String getPgApMaterno() {
        return pgApMaterno;
    }

    public void setPgApMaterno(String pgApMaterno) {
        this.pgApMaterno = pgApMaterno;
    }

    public String getPgNombre() {
        return pgNombre;
    }

    public void setPgNombre(String pgNombre) {
        this.pgNombre = pgNombre;
    }

    public String getPgcodEscuela() {
        return pgcodEscuela;
    }

    public void setPgcodEscuela(String pgcodEscuela) {
        this.pgcodEscuela = pgcodEscuela;
    }

    public String getPgEscuela() {
        return pgEscuela;
    }

    public void setPgEscuela(String pgEscuela) {
        this.pgEscuela = pgEscuela;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pgTmpCursoalumnosPK != null ? pgTmpCursoalumnosPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PgTmpCursoalumnos)) {
            return false;
        }
        PgTmpCursoalumnos other = (PgTmpCursoalumnos) object;
        if ((this.pgTmpCursoalumnosPK == null && other.pgTmpCursoalumnosPK != null) || (this.pgTmpCursoalumnosPK != null && !this.pgTmpCursoalumnosPK.equals(other.pgTmpCursoalumnosPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.fii.entity.PgTmpCursoalumnos[ pgTmpCursoalumnosPK=" + pgTmpCursoalumnosPK + " ]";
    }
    
}
